package com.fowo.api.model.customer;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 客户管理 导入导出辅助模型 */
@Getter
@Setter
public class CustomerExcelPo {

  @Size(max = 50, message = "客户编号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "客户编号")
  private String code;

  @Size(max = 50, message = "客户名称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "客户名称")
  private String name;

  @Size(max = 50, message = "简称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "简称")
  private String shortName;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "使用组织")
  private String orgName;

  @ExcelIgnore
  @ExcelProperty(value = "使用组织")
  private Long org;
}
